package com.ls.pattern.behavior.command.tv;

import com.ls.pattern.behavior.command.Command;

public class TVOnCommand implements Command {
    //Receiver接收
    TVReceiver receiver;

    public TVOnCommand(TVReceiver receiver) {
        this.receiver = receiver;
    }

    //聚合LightReceiver
    @Override
    public void execute() {
        receiver.on();
    }

    @Override
    public void undo() {
        receiver.off();
    }
}
